import service from "@/utils/request";
import type {reqGetBaseTrademarkResponse, updateTrademarkRequest} from './model/trademark'

enum API {
  // 获取品牌
  getBaseTrademark = '/admin/product/baseTrademark',
  // 修改品牌
  updateTrademart = '/admin/product/baseTrademark/update',
  // 删除品牌
  deleteTrademark = '/admin/product/baseTrademark/remove',
  // 新增品牌
  AddTrademark = '/admin/product/baseTrademark/save'
}

// 获取 品牌 数据
export const reqGetBaseTrademark = (page: number, limit:number) => {
  return service.get<any, reqGetBaseTrademarkResponse>(`${API.getBaseTrademark}/${page}/${limit}`)
}

// 修改品牌数据
export const reqUpdateTrademart = (params:updateTrademarkRequest) => service.put(API.updateTrademart, params)

// 删除品牌
export const reqDeleteTrademark = (id: number) => service.delete(`${API.deleteTrademark}/${id}`)

// 新增品牌
export const reqAddTrademark = (params:updateTrademarkRequest) => service.post(API.AddTrademark, params)